<?php
/**
 * Created by PhpStorm.
 * User: jack
 * Date: 14/10/19
 * Time: 下午7:08
 */

namespace Wilead\IArtistBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;

/**
 * @ORM\Table()
 * @ORM\Entity
 */
class MonmentsAttachment
{
    /**
     * @ORM\Column(type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @ORM\Column(type="string")
     */
    private $url;

    /**
     * @Gedmo\Timestampable(on="create")
     * @ORM\Column(type="datetime")
     */
    private $createdAt;

    /**
     * @ORM\ManyToOne(targetEntity="Moments", inversedBy="Attachments")
     * @ORM\JoinColumn(name="MomentsId", referencedColumnName="id", onDelete="CASCADE")
     **/
    private $Monments;

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set url
     *
     * @param string $url
     * @return MonmentsAttachment
     */
    public function setUrl($url)
    {
        $this->url = $url;

        return $this;
    }

    /**
     * Get url
     *
     * @return string
     */
    public function getUrl()
    {
        return $this->url;
    }

    /**
     * Set createdAt
     *
     * @param \DateTime $createdAt
     * @return MonmentsAttachment
     */
    public function setCreatedAt($createdAt)
    {
        $this->createdAt = $createdAt;

        return $this;
    }

    /**
     * Get createdAt
     *
     * @return \DateTime
     */
    public function getCreatedAt()
    {
        return $this->createdAt;
    }

    /**
     * Set Monments
     *
     * @param \Wilead\IArtistBundle\Entity\Moments $monments
     * @return MonmentsAttachment
     */
    public function setMonments(\Wilead\IArtistBundle\Entity\Moments $monments = null)
    {
        $this->Monments = $monments;

        return $this;
    }

    /**
     * Get Monments
     *
     * @return \Wilead\IArtistBundle\Entity\Moments
     */
    public function getMonments()
    {
        return $this->Monments;
    }
}
